/*******************************************************************************
 * This file is part of TERMINAL RECALL
 * Copyright (c) 2018 Chuck Ritola
 * Part of the jTRFP.org project
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     chuck - initial API and implementation
 ******************************************************************************/

package org.jtrfp.trcl;

public abstract class TypeRunStateHandler extends RunStateHandler {
    private Class<?> clazz;
    
    public TypeRunStateHandler(Class<?> type) {
	this.clazz = type;
    }

    @Override
    public boolean isValidRunState(Object oldRunSatte, Object newRunState) {
	return clazz.isAssignableFrom(newRunState.getClass());
    }

}//end TypeRunStateHandler
